/*  ECSE-426 Microprocessor Laboratory
    Simple LED Blinking program
     - Used to learn debugging/register/memory options with crossworks.

    NOTE: 	This is not the most efficient way to program this function(we can put the 
		processor in low power mode and use interrupts for example) but it
		is easier to understand in the beginning.
*/

#include  <msp430x14x.h>

void main(void)
{
  int i;                                    // Variable used for Delay 
                                            // will be monitored in debugger

  WDTCTL = WDTPW + WDTHOLD;                 // Stop watchdog timer

  P1DIR |= 0x01;                            // Set P1.0 to output direction
  
  while(1)
  {

    for(i=0; i < 30000; ++i)                 // Delay
    {
      i = i+1;
    }                
    P1OUT ^= 0x01;                          // Toggle P1.0 using exclusive-OR

  }
}



